import request from '@/utils/request'
const path = "/interface"

export function findOperateTypeList(params) {
    return request({
        url: path + '/operateType/',
        method: 'get',
        params
    })
}
// 获取操作列表
export function findOperateList(params) {
    return request({
        url: path + '/operate/',
        method: 'get',
        params
    })
}
//新增操作
export function createOperate(data) {
    return request({
        url: path + '/operate/createOperate/',
        method: 'post',
        data
    })
}

//修改操作
export function updateOperate(data) {
    return request({
        url: path + '/operate/updateOperate/',
        method: 'post',
        data
    })
}

//删除操作
export function deleteAction(data) {
    return request({
        url: path + '/operate/deleteAction/',
        method: 'post',
        data
    })
}

// 设置操作权限
export function setOperates(data) {
    return request({
        url: path + '/operate/setOperates/',
        method: 'post',
        data
    })
}

// 公共事件
export function getFormData(data) {
    return request({
        url: '/interface/form/getFormData/',
        method: 'post',
        data
    })
}

// 通过formkey获取formdata数据
export function getFormDataByFormKey(data) {
    return request({
        url: '/interface/form/getFormDataByFormKey/',
        method: 'post',
        data
    })
}

export function getItemList(url, params) {
    return request({
        url: url,
        method: 'get',
        params
    })
}